package com.yu.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yu.subject.infra.basic.entity.SubjectInfo;
import com.yu.subject.infra.basic.mapper.SubjectInfoDao;
import com.yu.subject.infra.basic.service.SubjectInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 路亚
 * @version 0.1
 * @className SubjectInfoServiceImpl
 * @description
 * @date 2024/12/24 21:13
 * @since jdk11
 */
@Service
@RequiredArgsConstructor
public class SubjectInfoServiceImpl extends ServiceImpl<SubjectInfoDao, SubjectInfo> implements SubjectInfoService {

    private final SubjectInfoDao subjectInfoDao;

    @Override
    public void add(SubjectInfo subjectInfo) {
        subjectInfoDao.add(subjectInfo);
    }

    @Override
    public Integer countByCondition(SubjectInfo subjectInfo, Long categoryId, Long labelId) {
        return subjectInfoDao.countByCondition(subjectInfo, categoryId, labelId);
    }

    @Override
    public List<SubjectInfo> queryPage(SubjectInfo subjectInfo, Long categoryId, Long labelId, Integer start, Integer pageSize) {
        return subjectInfoDao.queryPage(subjectInfo, categoryId, labelId, start, pageSize);
    }
}
